# Author: Kuilin

# 课外实践举一反三
# 将phrase = "I love python!"转变成new_phrase = "pretty"

phrase = "I love python!"
plist = list(phrase)
print(phrase)
print(plist)

for i in range(2):
    plist.pop()
print(plist)

plist.pop(0)
plist.remove(" ")
plist.remove("l")
plist.append("r")
plist.sort()
print(plist)

plist.pop(0)
plist.remove("h")
plist.remove("o")
plist.remove("o")
print(plist)

plist.pop(4)
print(plist)

plist.insert(3,"t")
print(plist)

plist.insert(2,plist.pop(0))
print(plist)

new_phrase = ''.join(plist)
print("plist=",plist)
print("new_phrase=",new_phrase)
